﻿using System;
using System.Collections.Generic;
using System.Text;

using Effects.Effects;

namespace Effects.Application
{
    /// <summary>
    ///  Event arguments for Add Effect event
    /// </summary>
    /// <remarks>
    ///  This class are event args that are passed to the effect board when new effect being added to the board.
    /// </remarks>
    public class AddEffectEventArgs:EventArgs
    {
        /// <summary>
        ///  Effect to add.
        /// </summary>
        private Effect e;
        /// <summary>
        ///  Gets the effect that should be added to the board.
        /// </summary>
        public Effect AddedEffect
        {
            get { return e; }
        }

        /// <summary>
        ///  Channel where effect is added.
        /// </summary>
        private int channel;
        /// <summary>
        ///  Gets the number of channel where effect is added.
        /// </summary>
        public int Channel
        {
            get{return channel;}
        }

        /// <summary>
        ///  Creates new AddEffectEventArgs with given Effect and channel number.
        /// </summary>
        /// <param name="e"> <see cref="Effect"/> (usually derived class) being addded </param>
        /// <param name="channel"> Channel to which is effect added </param>
        public AddEffectEventArgs(Effect e,int channel)
        {
            this.e = e;
            this.channel = channel;
        }
    }

    /// <summary>
    ///  Add new effect event handler.
    /// </summary>
    /// <param name="sender"> Object that has raised the event </param>
    /// <param name="e"> Event arguments  </param>
    public delegate void AddEffectEventHandler(object sender,AddEffectEventArgs e);
}
